package com.netjava.action;

import javax.servlet.ServletContext;

import org.apache.struts.actions.DispatchAction;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

public class BaseAction extends DispatchAction{
	protected Object getBean(String id){
		ServletContext sc=this.servlet.getServletContext();
		ApplicationContext appContext=WebApplicationContextUtils.getWebApplicationContext(sc);
		return appContext.getBean(id);
		
	}
}
